﻿<CodeSnippetTabbed DocLink="https://docs.devexpress.com/Blazor/DevExpress.Blazor.DxCalendar-1#set-a-date-range">
    <CodeSnippetTabPage Text="Razor">@(@"<DxCalendar MinDate=""@MinDate"" MaxDate=""@MaxDate"">
</DxCalendar>

@code {
    DateTime MinDate { get; set; }
    DateTime MaxDate { get; set; }

    protected override void OnInitialized() {
        DateTime currentDateTime = DateTime.Now;

        MinDate = new DateTime(currentDateTime.Year, currentDateTime.Month, 1);
        MaxDate = new DateTime(currentDateTime.Year, currentDateTime.Month, DateTime.DaysInMonth(currentDateTime.Year, currentDateTime.Month));
    }
}")</CodeSnippetTabPage>
</CodeSnippetTabbed>
